package edu.hawaii.duedates;

import java.util.TimerTask;

/**
 * Executes a scheduled instance of a DueDates object.
 *   
 * @author Ronn Reeves and Robin Raqueno
 */
public class DueDatesTimerTask extends TimerTask {

  /** The parameters for the DueDates object. */
  private final String[] args;
  
  /**
   * Constructs a new DueDatesTimerTask object to execute a scheduled instance of a DueDates object
   * with the provided parameters.
   * 
   * @param args The DueDates parameters.
   */
  public DueDatesTimerTask(String[] args) {  
    this.args = args.clone();
  }

  /**
   * Executes this instance of a DueDates object.
   */
  @Override
  public void run() {
    new DueDates(args);
  }
}